﻿<?xml version="1.0" encoding="utf-8" ?>
<Recipe Name="ConfigureVSPlk" xmlns="http://schemas.microsoft.com/pag/gax-core"
                               xmlns:xi="http://www.w3.org/2001/XInclude" Bound="false">
  <DocumentationLinks>
    <Link Kind="Documentation" Caption="VSPackage Load Keys" Url="ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.VSSDK.v80/dv_vsintegration/html/7304e3cf-1d06-4c08-a911-74e324eb4cef.htm" />
    <Link Kind="Documentation" Caption="How to: Obtain a PLK" Url="ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.VSSDK.v80/dv_vsintegration/html/46db0aff-b39d-4414-8bca-4a978e082fb3.htm" />
    <Link Kind="Documentation" Caption="How to: Install a PLK" Url="ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.VSSDK.v80/dv_vsintegration/html/821f0c53-3cc7-4ba5-91f8-918b6e28c461.htm" />
  </DocumentationLinks>  
  <xi:include href="../Common/CommonTypeAliases.xml"
				xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Types)" />
  <Caption>Configure VS Package Load Key</Caption>
  <Description>Configure VS Package Load Key</Description>
  <HostData>
    <Icon File="Resources\PLK.ico" />
    <CommandBar Menu="VSSDKAssistProjectDeploy"/>
  </HostData>
  <Arguments>
    <xi:include href="../Common/CommonArguments.xml"
					  xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Arguments/gax:Argument)" />
    <Argument Name="VSPackageCodeClass" Type="EnvDTE.CodeClass, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Required="true">
      <ValueProvider Type="VSSDKAssist.Recipes.Common.ValueProviders.VSPackageCodeClassValueProvider, VSSDKAssist"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="PkgCompanyName" Required="true">
      <ValueProvider Type="VSSDKAssist.Recipes.ConfigureVSPlk.ProvideLoadKeyAttributeValueProvider, VSSDKAssist"
                     CodeClassArgument="VSPackageCodeClass"
                     AttributeArgument="CompanyName"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="PackageName" Required="true">
      <ValueProvider Type="VSSDKAssist.Recipes.ConfigureVSPlk.ProvideLoadKeyAttributeValueProvider, VSSDKAssist"
                     CodeClassArgument="VSPackageCodeClass"
                     AttributeArgument="ProductName"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="PackageVersion" Required="true">
      <ValueProvider Type="VSSDKAssist.Recipes.ConfigureVSPlk.ProvideLoadKeyAttributeValueProvider, VSSDKAssist"
                     CodeClassArgument="VSPackageCodeClass"
                     AttributeArgument="ProductVersion"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="VSEdition" Required="true">
      <Converter Type="VSSDKAssist.Recipes.Common.Converters.VSEditionConverter, VSSDKAssist"/>
      <ValueProvider Type="VSSDKAssist.Recipes.ConfigureVSPlk.ProvideLoadKeyAttributeValueProvider, VSSDKAssist"
                     CodeClassArgument="VSPackageCodeClass"
                     AttributeArgument="MinimumEdition"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="ResxProjectItem" Type="EnvDTE.ProjectItem, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Required="true">
      <ValueProvider
        Type="VSSDKAssist.Recipes.Common.ValueProviders.VSPackageResxProjectItemValueProvider, VSSDKAssist"
        VSPackageCodeClassArgument="VSPackageCodeClass"
        Stage="OnBeginRecipe"/>      
    </Argument>
    <Argument Name="Plk" Required="true"/>
    <Argument Name="PlkResourceId" Required="true">
      <ValueProvider Type="VSSDKAssist.Recipes.ConfigureVSPlk.ProvideLoadKeyAttributeValueProvider, VSSDKAssist"
                     CodeClassArgument="VSPackageCodeClass"
                     AttributeArgument="ResourceId"
                     Stage="OnBeginRecipe"/>
    </Argument>    
  </Arguments>
  <GatheringServiceData>
    <Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
      <Pages>
        <Page Type="VSSDKAssist.Recipes.ConfigureVSPlk.ConfigureVSPlkCP1, VSSDKAssist"
          Height="200" Width="510">
          <Title>Specify package general properties</Title>
          <LinkTitle>Package general properties</LinkTitle>
        </Page>
        <Page Type="VSSDKAssist.Recipes.ConfigureVSPlk.ConfigureVSPlkCP2, VSSDKAssist"
          Height="200" Width="510">
          <Title>Specify PLK properties</Title>
          <LinkTitle>PLK properties</LinkTitle>
        </Page>
      </Pages>
    </Wizard>
  </GatheringServiceData>  
  <Actions CoordinatorServiceType="VSSDKAssist.Recipes.Common.Coordinators.ExecutionProgressCoordinator, VSSDKAssist">
    <!-- Add ProvideLoadKey attribute -->
    <Action Name="AddProvideLoadKeyAttribute"
            Type="VSSDKAssist.Recipes.ConfigureVSPlk.AddProvideLoadKeyAttributeAction, VSSDKAssist"
            StatusMessage="Adding PLK registration information"
            WriteMessageToOutputWindow="true">
      <Input Name="CodeClass" RecipeArgument="VSPackageCodeClass"/>
      <Input Name="PkgCompanyName" RecipeArgument="PkgCompanyName"/>
      <Input Name="PackageName" RecipeArgument="PackageName"/>
      <Input Name="PackageVersion" RecipeArgument="PackageVersion"/>
      <Input Name="VSEdition" RecipeArgument="VSEdition"/>
      <Input Name="PlkResourceId" RecipeArgument="PlkResourceId"/>
    </Action>
    <!-- Update Resx -->
    <Action Name="UpdateResx"
            Type="VSSDKAssist.Recipes.Common.Actions.AddTextEntryToResxAction, VSSDKAssist"
            StatusMessage="Updating resource file"
            WriteMessageToOutputWindow="true">
      <Input Name="ResxProjectItem" RecipeArgument="ResxProjectItem"/>
      <Input Name="Text" RecipeArgument="Plk"/>
      <Input Name="TextResourceId" RecipeArgument="PlkResourceId"/>
    </Action>    
  </Actions>
</Recipe>